import { MockMethod } from "vite-plugin-mock";

const mock: Array<MockMethod> = [
  {
    url: "/mock/system/login",
    method: "post",
    response: () => {
      return {
        collection: "esse labore",
        data: {
          deptName: "技术部门",
          dataSourceId: "44",
          userAccount: "in ea",
          loginMsg: "eu minim enim magna dolor",
          deptId: 75,
          accessToken: "ZWQyMFl5ZVowWCtqWFdrV0dmSndhaHRNTjhkWmxDSGNHaHZpY212",
          loginStatus: 93,
          supplierCode: 33,
          userId: 73,
          userName: "系统管理员",
        },
        msg: "sunt aute proident enim consectetur",
        pages: 96,
        timestamp: "1730342047",
        total: 32,
        httpCode: 200,
      };
    },
  },
  {
    url: "/mock/system/index",
    method: "post",
    response: () => {
      return {
        httpCode: 200,
        message: "成功",
        data: {
          menus: [
            {
              menuType: "M",
              url: "/system",
              name: "",
              icon: "Setting",
              menuName: "系统管理",
              children: [
                {
                  children: null,
                  menuType: "C",
                  name: "Menu",
                  url: "/system/menu",
                  icon: "",
                  menuName: "菜单管理",
                },
                {
                  children: null,
                  menuType: "C",
                  name: "Role",
                  url: "/system/role",
                  icon: "",
                  menuName: "角色管理",
                },
                {
                  children: null,
                  menuType: "C",
                  name: "User",
                  url: "/system/user",
                  icon: "",
                  menuName: "用户管理",
                },
                {
                  children: null,
                  menuType: "C",
                  name: "Dept",
                  url: "/system/dept",
                  icon: "",
                  menuName: "部门管理",
                },
              ],
            },
            {
              menuType: "M",
              url: "/system",
              icon: "User",
              name: "",
              menuName: "客户管理",
              children: null,
            },
            {
              menuType: "M",
              url: "/directives",
              name: "",
              icon: "CollectionTag",
              menuName: "自定义指令",
              children: [
                {
                  children: null,
                  menuType: "C",
                  url: "/directives/thrShaking",
                  name: "ThrShaking",
                  icon: "",
                  menuName: "节流防抖",
                },
              ],
            },
            {
              menuType: "M",
              url: "/table",
              name: "",
              icon: "Grid",
              menuName: "表格",
              children: [
                {
                  children: null,
                  menuType: "C",
                  url: "/table/packTable",
                  name: "PackTable",
                  icon: "",
                  menuName: "表格基本封装",
                },
                {
                  children: null,
                  menuType: "C",
                  url: "/table/userList",
                  name: "UserTable",
                  icon: "",
                  menuName: "Spurs表格封装",
                },
                {
                  children: null,
                  menuType: "C",
                  url: "/table/dragableTable",
                  name: "DragableTable",
                  icon: "",
                  menuName: "表格拖拽",
                },
                {
                  children: null,
                  menuType: "C",
                  url: "/table/editTable",
                  name: " EditTable",
                  icon: "",
                  menuName: "表格编辑",
                },
                {
                  children: null,
                  menuType: "C",
                  url: "/table/contextTable",
                  name: "ContextTable",
                  icon: "",
                  menuName: "表格右键菜单",
                },
              ],
            },
            {
              menuType: "M",
              url: "/form",
              name: "",
              icon: "Tickets",
              menuName: "表单",
              children: [
                {
                  children: null,
                  menuType: "C",
                  url: "/form/simpleForm",
                  name: "SimpleForm",
                  icon: "",
                  menuName: "Spurs表单封装",
                },
              ],
            },
            {
              menuType: "M",
              url: "/dialog",
              name: "",
              icon: "Notification",
              menuName: "对话框",
              children: [
                {
                  children: null,
                  menuType: "C",
                  url: "/dialog/simpleDialog",
                  name: "SimpleDialog",
                  icon: "",
                  menuName: "Dialog封装",
                },
              ],
            },
            {
              menuType: "M",
              name: "",
              url: "/system",
              icon: "Document",
              menuName: "订单管理",
              children: null,
            },
          ],
        },
        // user: {
        //   userName: "系统管理员",
        //   loginName: "admin",
        // },
        ok: true,
      };
    },
  },
];

export default mock;
